<?php
    $export_file = "santri_baru.xls";
    ob_end_clean();
    ini_set('zlib.output_compression','Off');
    
    header('Pragma: public');
    header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');  // Date in the past    
    header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT');
    header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1 
    header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
    header('Pragma: no-cache');
    header('Expires: 0');
    header('Content-Transfer-Encoding: none');
    header('Content-Type: application/vnd.ms-excel;'); // This should work for IE & Opera
    header('Content-type: application/x-msexcel'); // This should work for the rest
    header('Content-Disposition: attachment; filename="' . basename($export_file) . '"');
?>


<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Santri Baru</title>
<style type="text/css">
.tabel1 {
	font-family: "Times New Roman", Times, serif;
	background-color: #EEE;
	font-size: 10pt;
	font-style: normal;
	color: #000;
	font-weight: normal;
}
</style></head>

<body>
<table width="302%" border=1 align="left" class="tabel1" id="santri_baru">
<tr>
  <td width="3%" bgcolor=silver class='medium'>ID PSB</td><td width="3%" bgcolor=silver class='medium'>nama_lengkap</td><td width="3%" bgcolor=silver class='medium'>nama_panggilan</td><td width="2%" bgcolor=silver class='medium'>tempat_lahir</td><td width="2%" bgcolor=silver class='medium'>tanggal_lahir</td><td width="1%" bgcolor=silver class='medium'>kelamin</td><td width="3%" bgcolor=silver class='medium'>catatan_kesehatan</td><td width="3%" bgcolor=silver class='medium'>warga_negara</td><td width="2%" bgcolor=silver class='medium'>alamat</td><td width="2%" bgcolor=silver class='medium'>propinsi</td><td width="2%" bgcolor=silver class='medium'>kabupaten</td><td width="2%" bgcolor=silver class='medium'>kecamatan</td><td width="2%" bgcolor=silver class='medium'>kode_pos</td><td width="4%" bgcolor=silver class='medium'>pendidikan_terakhir</td><td width="2%" bgcolor=silver class='medium'>tahun_lulus</td><td width="2%" bgcolor=silver class='medium'>sekolah_asal</td><td width="3%" bgcolor=silver class='medium'>alamat_sekolah</td><td width="2%" bgcolor=silver class='medium'>nama_wali</td><td width="3%" bgcolor=silver class='medium'>pekerjaan_wali</td><td width="4%" bgcolor=silver class='medium'>kontak_wali</td><td width="4%" bgcolor=silver class='medium'>alamat_wali</td><td width="3%" bgcolor=silver class='medium'>nama_ibu</td><td width="3%" bgcolor=silver class='medium'>pekerjaan_ibu</td><td width="2%" bgcolor=silver class='medium'>kontak_ibu</td><td width="9%" bgcolor=silver class='medium'>alamat_ibu</td><td width="3%" bgcolor=silver class='medium'>email</td><td width="2%" bgcolor=silver class='medium'>password</td><td width="3%" bgcolor=silver class='medium'>dokumen_lengkap</td><td width="2%" bgcolor=silver class='medium'>pembayaran</td><td width="2%" bgcolor=silver class='medium'>Catatan</td><td width="2%" bgcolor=silver class='medium'>Tgl Daftar</td><td width="2%" bgcolor=silver class='medium'>Di Ubah</td><td width="2%" bgcolor=silver class='medium'>id_user</td><td width="2%" bgcolor=silver class='medium'>id_sekolah</td><td width="2%" bgcolor=silver class='medium'>id_priode</td><td width="7%" bgcolor=silver class='medium'>id_ta</td></tr>
  <?php $no=1; foreach ($homes as $lap): ?>
<tr>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->id_santri_baru; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->nama_lengkap; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->nama_panggilan; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->tempat_lahir; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->tanggal_lahir; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->kelamin; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->catatan_kesehatan; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->warga_negara; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->alamat; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->propinsi; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->kabupaten; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->kecamatan; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->kode_pos; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->pendidikan_terakhir; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->tahun_lulus; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->sekolah_asal; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->alamat_sekolah; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->nama_wali; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->pekerjaan_wali; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->kontak_wali; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->alamat_wali; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->nama_ibu; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->pekerjaan_ibu; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->kontak_ibu; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->alamat_ibu; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->email; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->password; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->dokumen_lengkap; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->pembayaran; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->Catatan; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->tgl_reg; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->last_change; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->id_user; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->id_sekolah; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php echo $lap->id_priode; ?></td>
  <td bgcolor=#FFFFFF class='medium'><?php $tahu=$lap->id_ta; echo $tahu; ?></td>
</tr><?php endforeach; ?> 
</table>
</body>
</html>
